1: | le(0,y) | → true | |
2: | le(s(x),0) | → false | |
3: | le(s(x),s(y)) | → le(x,y) | |
4: | minus(0,y) | → 0 | |
5: | minus(s(x),y) | → if_minus(le(s(x),y),s(x),y) | |
6: | if_minus(true,s(x),y) | → 0 | |
7: | if_minus(false,s(x),y) | → s(minus(x,y)) | |
8: | mod(0,y) | → 0 | |
9: | mod(s(x),0) | → 0 | |
10: | mod(s(x),s(y)) | → if_mod(le(y,x),s(x),s(y)) | |
11: | if_mod(true,s(x),s(y)) | → mod(minus(x,y),s(y)) | |
12: | if_mod(false,s(x),s(y)) | → s(x) | |
13: | LE(s(x),s(y)) | → LE(x,y) | |
14: | MINUS(s(x),y) | → IF_MINUS(le(s(x),y),s(x),y) | |
15: | MINUS(s(x),y) | → LE(s(x),y) | |
16: | IF_MINUS(false,s(x),y) | → MINUS(x,y) | |
17: | MOD(s(x),s(y)) | → IF_MOD(le(y,x),s(x),s(y)) | |
18: | MOD(s(x),s(y)) | → LE(y,x) | |
19: | IF_MOD(true,s(x),s(y)) | → MOD(minus(x,y),s(y)) | |
20: | IF_MOD(true,s(x),s(y)) | → MINUS(x,y) | |